Groupheader: How to detect if Reprinted on new page

I have a report with data where the data might not fit on one page.
I have set the GroupHeader to RepeatOnNewPage (=true).

In this report I'd like detect if a groupheader has been reprinted on a new page so I can add something like " (continued from previous page)" after the tfrxmemoview that is in the groupheader.

Any ideas/suggestions? >

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 7:38AM
    create the memo in the group header and set its text. control its visibility using two variables
    (done notdone) which is set in the obp of the groupheaderband and reset in the oap event of the group footer band.
    or if your databand is a set size and it spreads to another page due to record count
    use the line# variable to turn on vis and oap event of footer to turn off
  • edited March 2009
    Hi gordk,

    thanks for your very quick response.

    Your input actually gave me a good idea after I couldn't get it to work (my failure for not quite understanding what you're suggesting).

    1. I defined a global variable "lastgroupname" as a string.

    2. I made a memoview with "(continued)" as a text and named it "headercontinued".

    3. Then I made a obp;
    procedure GroupHeader1OnBeforePrint(Sender: TfrxComponent);
    begin
      if lastgroupname=<mydatasource."mygroupfield"> then
        headercontinued.visible:=true
      else
        headercontinued.visible:=false;
    
      lastgroupname:=<mydatasource."mygroupfield">;                    
    end;
    

    and that works GREAT ... [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> Thanks again! I hope this info can be useful to someone else as well[/img]>

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.